﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.ConversationalAgent;
using Windows.Foundation.Collections;

namespace XiaoweiUWP.AppServiceResponseHandlers
{
    public static class MvaAppServiceResponseHandler
    {
        public static ValueSet RequestMvaInit(ValueSet message)
        {
            Services.MVAWakeUpService.Instance.Init();
            return null;
        }

        public static ValueSet RequestMvaAgentStateChange(ValueSet message)
        {
            if (!message.ContainsKey("AgentState"))
            {
                return null;
            }
            Services.MVAWakeUpService.Instance.RequestAgentStateChangeAsync((ConversationalAgentState)message["AgentState"]);
            return null;
        }
        public static ValueSet RequestMvaStageChange(ValueSet message)
        {
            if (!message.ContainsKey("FirstStage") || !message.ContainsKey("SecondStage"))
            {
                return null;
            }
            Services.MVAWakeUpService.Instance.SetEnableStageKws((bool)message["FirstStage"], (bool)message["SecondStage"]);
            return null;
        }

        static MvaAppServiceResponseHandler()
        {
        }
    }
}
